home *** CD-ROM | disk | FTP | other *** search
/ Network CD 2 / Network CD - Volume 2.iso / programs / internet / tcp / clients / gadreq.lha / GadReq.Rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  1995-02-03  |  928 b   |  45 lines

  1. /*GadReq V1.0
  2.   A simple utility to run GadMget, and then request the selected files
  3.   using DaFTP. */
  4.  
  5.  
  6. /*Variables*/
  7. GadPath = 'AMITCP:GadMget'  /*Path to GadMget*/
  8. Recent='DH3:DL/RECENT'      /*Path to your RECENT file*/
  9. GadOut = 'CLIP:'            /*Path to GadMget's output file*/
  10.  
  11. /*end of variables**/
  12.  
  13. address command gadpath' 'Recent 'OUTPUT 'GadOut' NOSIMPLEPATHS'
  14. address 'daftp'
  15. call open(clip,GadOut,r)
  16. stem = 1
  17. call sep
  18. do while ~eof(clip)
  19.   call sep
  20. end
  21. call close(clip)
  22. call open(CON,'con:0/400/-1/112/DaftRequest','W')
  23. mes = 'Selected 'stem-1' File'
  24. if stem >2 then mes =mes||'s'
  25. call writeln(con,mes)
  26. do count = 1 to stem-1
  27.   call writeln(con,fil.count)
  28. end
  29. call writeln(con,'')
  30. do count = 1 to stem-1
  31.   call writeln(con,'Requesting 'fil.count)
  32.   get fil.count
  33. end
  34.  
  35. exit
  36.  
  37. sep:
  38. lis = readln(clip)
  39. lis = left(lis,length(lis)-1)
  40. w = words(lis)
  41. do count = 2 to w
  42.   fil.stem = word(lis,count)
  43.   stem = stem + 1
  44. end
  45.